package exam.t5;

import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;

public class Test {
    public static void main(String[] args) throws NoSuchMethodException, InvocationTargetException, IllegalAccessException {
        Class aClass1=Person.class;
        Method give1=aClass1.getDeclaredMethod("give");
        Person person=new Person();
        give1.setAccessible(true);
        give1.invoke(person);
    }
}
